home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 September
/
Macworld (1998-09).dmg
/
Shareware World
/
Info
/
For Developers
/
Script Tools 1.3.6
/
Examples
/
Quit All Applications
< prev
next >
Wrap
Text File
|
1993-09-11
|
729b
|
28 lines
--
-- This script asks all the non-essential applications running on your Macintosh to
-- quit. The property appsToKeep lists those applications you consider essential
--
property appsToKeep : {"Finder", "Eyes", "Monitor"}
set appList to list processes
repeat with i from 1 to count of appList
set appName to item i of appList
set appInfo to get process appName
if not onlyBackground of appInfo then
set skipIt to false
repeat with j from 1 to count of appsToKeep
if appName = (item j of appsToKeep) then
set skipIt to true
exit repeat
end if
end repeat
if not skipIt and appName ≠ (get current process) then
tell application appName
activate
quit
end tell
end if
end if
end repeat